import request from '@/utils/request'

/**
 * 创建评价
 */
export function createReview(data) {
  return request({
    url: '/review/create',
    method: 'post',
    data
  })
}

/**
 * 获取用户收到的评价列表
 */
export function getUserReviews(userId, page = 1, size = 10) {
  return request({
    url: `/review/user/${userId}`,
    method: 'get',
    params: {
      page,
      size
    }
  })
}
